<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
<!--自动检测屏幕大小-->		
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">		
		
		<title></title>
		<link rel="stylesheet" type="text/css" href="js/bootstrap.css"/>
		<script src="js/jquery-3.2.0.min.js"></script>
		<script src="js/bootstrap.js"></script>
		
		<style type="text/css">
			body{
				padding-top: 60px;
			}
		</style>
		
		
	</head>
	<body data-spy="scroll" data-target="#mynav" data-offset="150">
		
		<pre>
			滚动监听：大多说是监听 body 的高度
			给 body 设置 data-spy="scroll" 监听 body 的高度 
			data-target="id/class" 要监听的对象
			data-offset="150" 从100px开始监听，不用加单位
		</pre>
		
		
		
		<nav class="navbar navbar-default navbar-fixed-top" id="mynav">
	    	<div class="container">
	        	<div class="navbar-header">
	            	<a href="" class="navbar-brand">官网</a>
	            	
	            	<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#mynavbar">
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
						<span class="icon-bar"></span>
					</button>
	            	
	        	</div>
	
	        	<div class="collapse navbar-collapse" id="mynavbar">
	            	<ul class="nav navbar-nav">
	                	<li class="active"><a href="#aaa">111</a></li>
	                	<li class=""><a href="#bbb">222</a></li>
	                	<li class=""><a href="#ccc">333</a></li>
	            	</ul>
	        	</div>
	    	</div>
	    </nav>

<!--***********************************************************************-->
	    <div class="container">
		    <div class="panel panel-primary">
		    	<div class="panel-heading">
		    		<div class="panel-title">
		    			<h1 id="aaa">111</h1>
		    		</div>
		    	</div>
		    	<div class="panel-body">
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    		<p>11111111</p>
		    	</div>
		    	<div class="panel-footer"></div>
		    </div>
		    
		    <div class="panel panel-primary">
		    	<div class="panel-heading">
		    		<div class="panel-title">
		    			<h1 id="bbb">222</h1>
		    		</div>
		    	</div>
		    	<div class="panel-body">
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		<p>22222222</p>
		    		
		    	</div>
		    </div>
		    
		    <div class="panel panel-primary">
		    	<div class="panel-heading">
		    		<div class="panel-title">
		    			<h1 id="ccc">333</h1>
		    		</div>
		    	</div>
		    	<div class="panel-body">
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    		<p>33333333</p>
		    	</div>
		    </div>
	    </div>
		
		
	</body>
</html>
